import request from '@/utils/request'

// 封装获取权限接口
export const getPermissionList = () => request({
  url: '/sys/permission'

})

// 新增权限接口
export const addPermission = (data) => request({
  url: '/sys/permission',
  method: 'post',
  data
})

// 编辑权限接口
export const editPermission = (data) => request({
  url: `/sys/permission/${data.id}`,
  method: 'put',
  data
})

// 删除权限接口
export const delPermission = (id) => request({
  url: `/sys/permission/${id}`,
  method: 'delete'
})

// 获取权限点详情
export const getPermissionId = (id) => request({
  url: `/sys/permission/${id}`
})
